<template>
    <div class="index">
        <IndexHeader></IndexHeader>
        <IndexOperation></IndexOperation>
        <div class="main_content">
            <Split v-model="mainView">
                <div slot="left" class="left_management">
                    <IndexManagement></IndexManagement>
                </div>
                <div slot="right" class="right_configuration">
                    <IndexConfiguration></IndexConfiguration>
                    <IndexOutputLog></IndexOutputLog>
                </div>
            </Split>

        </div>
    </div>
</template>

<script>
  import IndexOperation from "../components/IndexOperation/IndexOperation";
  import IndexConfiguration from '../components/IndexConfiguration';
  import IndexOutputLog from '../components/IndexOutputLog';
  import IndexManagement from '../components/IndexManagement';
  import IndexHeader from "../components/IndexHeader";
  import {Split} from 'view-design';

  export default {
    components: {
      IndexHeader, IndexOperation, IndexConfiguration, IndexOutputLog, IndexManagement, Split,
    },
    mounted() {
      // window.addEventListener('beforeunload', event => {
      //   const msg = "确定要离开吗？";
      //   event.returnValue = msg;
      //   return msg;
      // });
    },
    data() {
      return {
        mainView: 0.14,
      }
    },
  }
</script>

<style scoped lang="scss">
    .index {
        height: 100%;
        display: flex;
        flex-direction: column;

        .main_content {
            flex: 1;
            display: flex;

            .left_management {
                height: 100%;
                width: 100%;
            }

            .right_configuration {
                height: 100%;
                width: 100%;
                display: flex;
                flex-direction: column;
            }
        }
    }
</style>
